#include "DirectionalLight.h"
POCELAIN_NAMESPACE_BEGIN
DirectionalLight::DirectionalLight(Real intensity, Color color)
    :Light(intensity,color)
{
    this->setPosition(Node3D::DefaultUp);
}
DirectionalLight::~DirectionalLight()
{
}
void DirectionalLight::setTarget(Node3D *target)
{
    if(mTarget!=nullptr)
    {
        mTarget->release();
    }
    mTarget = target;
    if(mTarget!=nullptr)
    {
        mTarget->retain();
    }
    else
    {
        mTarget = new Node3D;
    }
}
POCELAIN_NAMESPACE_END
